home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
language
/
forth_83.zoo
/
printer.scr
< prev
next >
Wrap
Text File
|
1992-04-07
|
31KB
|
1 lines
\\ *** Printer-Interface *** 10oct86we Dieses File enthält das Printer-Interface. Die Definitionen für die Druckersteuerung müssen ggf. an Ihren Drucker angepaßt wer- den. PRINT lenkt alle Ausgabeworte auf den Drucker um, mit DISPLAY wird wieder auf dem Bildschirm ausgegeben. Zum Ausdrucken der Quelltexte gibt es die Worte pthru ( from to -- ) druckt Screen from bis to document ( from to -- ) wie pthru, aber mit Shadow-Screens printall ( -- ) wie pthru, aber druckt das ganze File listing ( -- ) wie document, aber für das ganze File \ Printer Interface Epson RX80\FX80 21oct86we Onlyforth \needs file? ' noop | Alias file? \needs capacity ' blk/drv Alias capacity Vocabulary Printer Printer definitions also 1 &13 +thru Onlyforth \ clear \ Printer p! and controls 18nov86we ' bcostat | Alias ready? ' 0 | Alias printer : p! ( n -- ) BEGIN pause printer ready? UNTIL printer bconout ; | : ctrl: ( 8b -- ) Create c, does> ( -- ) c@ p! ; 07 ctrl: BEL $7F | ctrl: DEL $0D | ctrl: RET $1B | ctrl: ESC $0A ctrl: LF $0C ctrl: FF \ Printer controls 09sep86re | : esc: ( 8b -- ) Create c, does> ( -- ) ESC c@ p! ; | : esc2 ( 8b0 8b1 -- ) ESC p! p! ; | : on: ( 8b -- ) Create c, does> ( -- ) ESC c@ p! 1 p! ; | : off: ( 8b -- ) Create c, does> ( -- ) ESC c@ p! 0 p! ; \ Printer Escapes Epson RX-80/FX-80 12sep86re $0F | ctrl: (+17cpi $12 | ctrl: (-17cpi Ascii P | esc: (+10cpi Ascii M | esc: (+12cpi Ascii 0 esc: 1/8" Ascii 1 esc: 1/10" Ascii 2 esc: 1/6" Ascii T esc: suoff Ascii N esc: +jump Ascii O esc: -jump Ascii G esc: +dark Ascii H esc: -dark \ Ascii 4 esc: +cursive Ascii 5 esc: -cursive Ascii W on: +wide Ascii W off: -wide Ascii - on: +under Ascii - off: -under Ascii S on: sub Ascii S off: super \ Printer Escapes Epson RX-80/FX-80 12sep86re : 10cpi (-17cpi (+10cpi ; ' 10cpi Alias pica : 12cpi (-17cpi (+12cpi ; ' 12cpi Alias elite : 17cpi (+10cpi (+17cpi ; ' 17cpi Alias small : lines ( #.of.lines -- ) Ascii C esc2 ; : "long ( inches -- ) 0 lines p! ; : american 0 Ascii R esc2 ; : german 2 Ascii R esc2 ; : normal 10cpi american suoff 1/6" &12 "long RET ; \ Umlaute 14oct86we | Create DIN Ascii ä c, Ascii ö c, Ascii ü c, Ascii ß c, Ascii Ä c, Ascii Ö c, Ascii Ü c, Ascii § c, | Create AMI Ascii { c, Ascii | c, Ascii } c, Ascii ~ c, Ascii [ c, Ascii \ c, Ascii ] c, Ascii @ c, here AMI - | Constant tablen | : p! ( char -- ) dup $80 < IF p! exit THEN tablen 0 DO dup I DIN + c@ = IF drop I AMI + c@ LEAVE THEN LOOP german p! american ; \ Printer Output 12sep86re | Variable pcol pcol off | Variable prow prow off | : pemit ( 8b -- ) p! 1 pcol +! ; | : pcr ( -- ) RET LF 1 prow +! pcol off ; | : pdel ( -- ) DEL pcol @ 1- 0 max pcol ! ; | : ppage ( -- ) FF prow off pcol off ; | : pat ( row col -- ) over prow @ < IF ppage THEN swap prow @ - 0 ?DO pcr LOOP dup pcol @ < IF RET pcol off THEN pcol @ - spaces ; | : pat? ( -- row col ) prow @ pcol @ ; | : ptype ( adr len -- ) dup pcol +! bounds ?DO I c@ p! LOOP ;